package com.kingsoft.dc.khaos.module.spark.model

import com.kingsoft.dc.khaos.extender.meta.model.col.DmTableColumn
import com.kingsoft.dc.khaos.extender.meta.model.db.DmDatabase
import com.kingsoft.dc.khaos.extender.meta.model.ds.{HAWQConnect, _}
import com.kingsoft.dc.khaos.extender.meta.model.table.DmTable
import com.kingsoft.dc.khaos.module.spark.model.cos.CosAccessConfig
import com.kingsoft.dc.khaos.module.spark.model.ks3.Ks3AccessConfig

import scala.beans.BeanProperty

/**
 *
 * create by goosoog 2019/6/20.
 *
 */
class MetaDataEntity extends Serializable {
  @BeanProperty var connect: Connect = null

  //hive数据源
  @BeanProperty var dsHiveConnect: HiveConnect = null
  //hdfs数据源
  @BeanProperty var dsHdfsConnect: HdfsConnect = null
  //cos数据源
  @BeanProperty var dsCosConnect: CosConnect = null
  //mysql数据源
  @BeanProperty var dsMysqlConnect: MysqlConnect = null
  //mpp数据源
  @BeanProperty var dsMppConnect: MppConnect = null
  //es数据源
  @BeanProperty var dsEsConnect: ESConnect = null
  //oracle数据源
  @BeanProperty var dsOracleConnect: OracleConnect = null
  //sqlserver数据源
  @BeanProperty var dsSqlServerConnect: SqlServerConnect = null
  //pgsql数据源
  @BeanProperty var dsPGSqlConnect: PGSqlConnect = null
  //hbase数据源
  @BeanProperty var dsHBaseConnect: HbaseConnect = null
  //phoenix数据源
  @BeanProperty var dsPhoenixConnect: PhoenixConnect = null
  //redis数据源
  @BeanProperty var dsRedisConnect: RedisConnect = null
  //influx数据源
  @BeanProperty var dsInfluxConnect: InfluxConnect = null
  //GP数据源
  @BeanProperty var dsGreenPlumConnect: GreenPlumConnect = null
  //HAWQ数据源
  @BeanProperty var dsHAWQConnect: HAWQConnect = null
  //ks3数据源
  @BeanProperty var dsKs3Connect: Ks3Connect = null
  //kafka数据源
  @BeanProperty var dsKafkaConnect: KafkaConnect = null

  //数据源标识
  @BeanProperty var datasourceEntiy: DmDatasource = null
  //db详情
  @BeanProperty var dbEntiy: DmDatabase = null
  //table详情
  @BeanProperty var tableEntiy: DmTable = null
  //字段详情
  @BeanProperty var columnEntiy: java.util.List[DmTableColumn] = null


  //数据源标识 true代表内置数据源(默认) false代表外置数据源
  @BeanProperty var defaultDs: Boolean = true
  //cos文件输入路径
  @BeanProperty var cosInputPath: String = ""
  //cos文件输出路径
  @BeanProperty var cosOutputPath: String = ""
  //
  @BeanProperty var cosBuketName: String = ""
  //文件分隔符
  @BeanProperty var cosFileDelimiter: String = ""
  //cos配置信息
  @BeanProperty var cosAccessConfig: CosAccessConfig = null

  //ks3配置信息
  @BeanProperty var ks3AccessConfig: Ks3AccessConfig = null
  //ks3文件输入路径
  @BeanProperty var ks3InputPath: String = ""
  //ks3文件输出路径
  @BeanProperty var ks3OutputPath: String = ""
  //ks3空间名称
  @BeanProperty var ks3BuketName: String = ""
  //文件分隔符
  @BeanProperty var ks3FileDelimiter: String = ""


  //hdfs文件输入路径
  @BeanProperty var hdfsInputPath: String = ""
  //hdfs文件输出路径
  @BeanProperty var hdfsOutputPath: String = ""
  //hdfsdb名称
  @BeanProperty var hdfsDBName: String = ""
  //文件分隔符
  @BeanProperty var hdfsFileDelimiter: String = ""


  @BeanProperty var tablePartition: Array[String] = null
}
